% Impose can 'draw' on the pages, script controlled

define ps_do_showpage(pagenum) {

	% startGFX must be called before the first commands are used
	startGFX();

	% set the current color in RGB (values 0.0. to 1.0) 
	% this is BLACK - while being default it poses as examples ;)
	setRGBColor (0.0, 0.0, 0.0);

	% This sets the font, encoding and X/Y-Sizes for the text
	% font is the 'true' font name as shown in the Fontmanager of PStill
	% encoding can be 0 for font default and 1 for ISOLatin1
	% X-Size in pts, likewise Y-Size
	setFont("Helvetica", 0, 12, 12);

	% This "prints" text on the current page
	% using sprintf(fmt,..., num_of_params);
	% you can also use define dynamic texts
	% parameters are
	%  text to be printed
	% x-position in pts (lower left == zero)
	% y-position in pts 
	% rotation in degree

	drawText( sprintf("Page %d",pagenum,1), ((pageWidth() / 2.0) - 20.0), 25, 0);

	% this one can impose any EPS on the page, you specify the path to the
	% EPS, its position, the scaling factor and the rotation.

	% execEPSFile("/path/to/test.eps", 200, 200, 1.0, 0);

	% Draw a Rectangle in the current color
	% drawRect(10,10,20,20);

	% Exec arbitary PS code
	% execPSCode ("0 0 moveto 10 10 lineto stroke");

	% setOverrideShowpage controls in the next showpage 
	% actually erases the page -
	% uncomment if you want to 'overlay' the next page in the input
	% setOverrideShowpage(1);

	% ... and so on, there is no limit for the elements you can impose here

	% this one ends the page drawing
	% it MUST be called before exiting the function

	endGFX();
}


